﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using MVC4App.SecurityServiceReference;

namespace MVC4App.Areas.Administrators.Models
{
    public class SiteModel
    {
        /// <summary>
        ///     Gets or sets the identifier.
        /// </summary>
        /// <value>
        ///     The identifier.
        /// </value>
        [Required]
        public int Id { get; set; }

        /// <summary>
        ///     Gets or sets the title.
        /// </summary>
        /// <value>
        ///     The title.
        /// </value>
        [Display(ResourceType = typeof(NmResources.AdminResource),Name = "lbTitle")]
        [StringLength(255)]
        [Required(ErrorMessageResourceType = typeof(NmResources.AdminErrorResource),ErrorMessageResourceName = "Required")]
        public string Title { get; set; }

        /// <summary>
        ///     Gets or sets the description.
        /// </summary>
        /// <value>
        ///     The description.
        /// </value>
        public string Description { get; set; }
        /// <summary>
        ///     Gets or sets the order.
        /// </summary>
        /// <value>
        ///     The order.
        /// </value>
        public int Order { get; set; }

        /// <summary>
        /// Gets or sets the controller.
        /// </summary>
        /// <value>
        /// The controller.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(NmResources.AdminErrorResource), ErrorMessageResourceName = "Required")]
        [Display(ResourceType = typeof(NmResources.AdminResource), Name = "lbController")]
        [StringLength(255)]        
        public string Controller { get; set; }

        /// <summary>
        ///     Gets or sets the parent identifier.
        /// </summary>
        /// <value>
        ///     The parent identifier.
        /// </value>
        public int? ParentId { get; set; }

        /// <summary>
        ///     Gets or sets the status.
        /// </summary>
        /// <value>
        ///     The status.
        /// </value>
        public bool? Status { get; set; }

        /// <summary>
        ///     Gets or sets the is group.
        /// </summary>
        /// <value>
        ///     The is group.
        /// </value>
        public bool? IsGroup { get; set; }

        /// <summary>
        /// Gets or sets the permission in sites.
        /// </summary>
        /// <value>
        /// The permission in sites.
        /// </value>
        public PermissionInSite[] PermissionInSites { get; set; }
        
    }
}